package com.ruoyi.find.mapper;

import com.ruoyi.find.domain.FurnitureWorkOrder;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 家具工单Mapper接口
 * 
 * @author ruoyi
 * @date 2025-05-24
 */
public interface FurnitureWorkOrderMapper 
{
    /**
     * 查询家具工单
     * 
     * @param orderId 家具工单主键
     * @return 家具工单
     */
    public FurnitureWorkOrder selectFurnitureWorkOrderByOrderId(Long orderId);

    /**
     * 根据工单编号查询工单
     * 
     * @param orderCode 工单编号
     * @return 家具工单
     */
    public FurnitureWorkOrder selectFurnitureWorkOrderByOrderCode(String orderCode);

    /**
     * 查询家具工单列表
     * 
     * @param furnitureWorkOrder 家具工单
     * @return 家具工单集合
     */
    public List<FurnitureWorkOrder> selectFurnitureWorkOrderList(FurnitureWorkOrder furnitureWorkOrder);

    /**
     * 新增家具工单
     * 
     * @param furnitureWorkOrder 家具工单
     * @return 结果
     */
    public int insertFurnitureWorkOrder(FurnitureWorkOrder furnitureWorkOrder);

    /**
     * 修改家具工单
     * 
     * @param furnitureWorkOrder 家具工单
     * @return 结果
     */
    public int updateFurnitureWorkOrder(FurnitureWorkOrder furnitureWorkOrder);

    /**
     * 删除家具工单
     * 
     * @param orderId 家具工单主键
     * @return 结果
     */
    public int deleteFurnitureWorkOrderByOrderId(Long orderId);

    /**
     * 批量删除家具工单
     * 
     * @param orderIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteFurnitureWorkOrderByOrderIds(Long[] orderIds);

    /**
     * 查询买家的工单列表
     * 
     * @param buyerUserId 买家用户ID
     * @return 工单列表
     */
    public List<FurnitureWorkOrder> selectWorkOrdersByBuyerId(@Param("buyerUserId") Long buyerUserId);

    /**
     * 查询卖家的工单列表
     * 
     * @param sellerUserId 卖家用户ID
     * @return 工单列表
     */
    public List<FurnitureWorkOrder> selectWorkOrdersBySellerId(@Param("sellerUserId") Long sellerUserId);

    /**
     * 根据状态查询工单
     * 
     * @param orderStatus 工单状态
     * @return 工单列表
     */
    public List<FurnitureWorkOrder> selectWorkOrdersByStatus(@Param("orderStatus") Integer orderStatus);

    /**
     * 更新工单状态
     * 
     * @param orderId 工单ID
     * @param orderStatus 状态
     * @return 结果
     */
    public int updateOrderStatus(@Param("orderId") Long orderId, @Param("orderStatus") Integer orderStatus);
}